package com.example.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class HelloController {

    @RequestMapping("/hello")
    @ResponseBody
    public String hello(String name){
        return "hello,"+name;
    }

    @RequestMapping("/testMV")
    public ModelAndView testMV(){
        return new ModelAndView("index");  //  index.jsp
    }
}
